import request from "@/utils/request";

export function login(params) {
    return request({
        url: "/login",
        method: "post",
        data: params
    });
}
export function getUserLoginInfo() {
    return request({
        url: "/users/login-user",
        method: "get",
    });

}
export function getUserList(params) {
    return request({
        url: "/users/search",
        method: "post",
        data: params
    });
}

export function addUser(params) {
    return request({
        url: "/users/create",
        method: "post",
        data: params
    });
}

export function editUser(params) {
    return request({
        url: `/users/${params.id}`,
        method: "put",
        data: params
    });
}

export function resetPassword(params) {
    return request({
        url: `/users/reset-password/${params.id}`,
        method: "get",
    });
}

export function deleteUser(params) {
    return request({
        url: `/users/delete`,
        method: "post",
        data: params
    });
}

export function modifyPassWord(params) {
    return request({
        url: `/users/modify-password`,
        method: "post",
        data: params
    });
}

